﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    public _Default()
    {
        //当page指令中的属性AutoEventWireup为false时，注册事件相应的处理方法
        //PreInit += Page_PreInit;
        Init += Page_Init;//+=是注册一个事件  -=是取消一个事件的绑定
        InitComplete += Page_InitComplete;
        PreLoad += Page_PreLoad;
        Load += Page_Load;
        LoadComplete += Page_LoadComplete;
    }

    protected void Page_Init(object sender, EventArgs e)
    {
        Response.Write("调用Init事件处理方法Page_Init<br>");
    }
    protected void Page_InitComplete(object sender, EventArgs e)
    {
        Response.Write("调用InitComplete事件处理方法Page_InitComplete<br>");
    }
    protected void Page_PreLoad(object sender, EventArgs e)
    {
        Response.Write("调用PreLoad事件处理方法Page_PreLoadbr<>");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write("调用Load事件处理方法Page_Load<br>");
    }
    protected void Page_LoadComplete(object sender, EventArgs e)
    {
        Response.Write("调用LoadComplete事件处理方法Page_LoadComplete");
    }

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
    }
}